﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CompositionPlugin.Service
{
    public class ModuleActivator : IModuleActivator
    {
        public virtual void Initialize() { }

        public object Active(ModuleDefinition definition)
        {
            if (definition == null)
                throw new ArgumentNullException("definition");
            return definition.Value;
        }

        public void Deactive(ModuleDefinition definition, object instance)
        {
            if (definition == null)
                throw new ArgumentNullException("definition");
            if (instance == null)
                throw new ArgumentNullException("instance");
        }

        public virtual void OnRuntimeDisposing() { }
        
    }
}
